Ozi: Don't do the wierd name splitting thing for multimode input if we're writing...
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 31 Oct 2005 23:54:24 +0000 (23:54 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 31 Oct 2005 23:54:24 +0000 (23:54 +0000)
gpsbabel/ozi.c

index ce48e8f6ebe6428df30c747563e72a7a617df13f..b33d1f9172600fafbf7bfd864bf6d0fe7e9df0b4 100644 (file)
@@ -69,9 +69,14 @@ ozi_openfile(char *fname) {
     char buff[32];
     
     /* if we're doing multi-track output, sequence the filenames like:
-     * mytrack.plt, mytrack-1.plt...
+     * mytrack.plt, mytrack-1.plt...unless we're writing to stdout.
      */
 
+    if (0 == strcmp(fname, "-")) {
+       file_out = xfopen(fname, "wb", MYNAME);
+       return;
+    }
+
     if ((track_out_count) && (ozi_objective == trkdata)) {
         sprintf(buff, "-%d", track_out_count);
     } else {